<template>
  <div class="shangjia">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span style="line-height: 36px;">质检单管理</span>
      </div>
      <s-table
        :table="table"
        :expand="false"
        @http="tableWatch">
        <el-form-item label="名称" prop="gysmc">
          <el-input type="text"
                    class="input"
                    v-model="autoVue_table_gysmc"
                    placeholder="供应商名称" spellcheck="false" auto-capitalize="off" auto-complete="off"
                    auto-correct="off"></el-input>
        </el-form-item>
        <el-form-item label="质检单号" prop="zjdh">
          <el-input type="text"
                    class="input"
                    v-model="autoVue_table_zjdh"
                    placeholder="质检单号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                    auto-correct="off"></el-input>
        </el-form-item>
        <el-form-item label="ASN编号" prop="asnbh">
          <el-input type="text"
                    class="input"
                    v-model="autoVue_table_asnbh"
                    placeholder="ASN编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                    auto-correct="off"></el-input>
        </el-form-item>
        <el-form-item label="创建时间" prop="cjsj">
          <el-date-picker
            v-model="autoVue_table_cjsj"
            type="daterange"
            placeholder="选择日期范围">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="质检单" prop="zt">
          <el-select v-model="autoVue_table_zt"
                     placeholder="质检单状态">
            <el-option
              label="全部"
              value=""></el-option>
            <el-option
              label="质检单创建"
              value="0"></el-option>
            <el-option
              label="部分质检"
              value="1"></el-option>
            <el-option
              label="全部质检"
              value="2"></el-option>
            <el-option
              label="质检完成"
              value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="出库任务" prop="ckrwzt">
          <el-select v-model="autoVue_table_ckrwzt"
                     placeholder="质检单出库任务状态">
            <el-option
              label="全部"
              value=""></el-option>
            <el-option
              label="初始"
              value="0"></el-option>
            <el-option
              label="1任务创建"
              value="1"></el-option>
            <el-option
              label="部分完成"
              value="2"></el-option>
            <el-option
              label="全部完成"
              value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="入库任务" prop="rkrwzt">
          <el-select v-model="autoVue_table_rkrwzt"
                     placeholder="质检单入库任务状态">
            <el-option
              label="全部"
              value=""></el-option>
            <el-option
              label="初始"
              value="0"></el-option>
            <el-option
              label="1任务创建"
              value="1"></el-option>
            <el-option
              label="部分完成"
              value="2"></el-option>
            <el-option
              label="全部完成"
              value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="可用操作"
          width="200">
          <template scope="s">
            <el-button type="success" icon="edit" size="mini" @click="dialogOpen(s.row)"></el-button>
            <el-button type="info" size="mini" @click="dialogMxOpen(s.row)">查看明细</el-button>
            <el-button type="warning" size="mini" @click="dialogTestOpen(s.row)">质量检验</el-button>
          </template>
        </el-table-column>
      </s-table>
    </el-card>
  </div>
</template>
<script>
  import {AutoVue} from '~/plugins/Tools';
  export default AutoVue({
    data: {
      table: {
        column:
          [
            { label: '仓库名称',
              prop: 'ckmc',
              minWidth: '0px',
              cRemarks: '',
              search: false,
            },
            { label: '货主名称',
              prop: 'ownerMc',
              minWidth: '0px',
              cRemarks: '',
              search: false },
            { label: '供应商名称',
              prop: 'gysmc',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: '质检单号',
              prop: 'zjdh',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: 'ASN编号',
              prop: 'asnbh',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: '创建时间',
              prop: 'cjsj',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: '质检时间',
              prop: 'zjsj',
              minWidth: '0px',
              cRemarks: '',
              search: false },
            { label: '质检人',
              prop: 'zjr',
              minWidth: '0px',
              cRemarks: '',
              search: false },
            { label: '质检单状态 0质检单创建 1部分质检 2全部质检 3 质检完成',
              prop: 'show_zt',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: '质检单出库任务状态 0初始 1任务创建 2 部分完成 3 全部完成',
              prop: 'show_ckrwzt',
              minWidth: '0px',
              cRemarks: '',
              search: true },
            { label: '质检单入库任务状态 0 初始 1任务创建 2部分完成 3全部完成',
              prop: 'show_rkrwzt',
              minWidth: '0px',
              cRemarks: '',
              search: true } ],
        url: '/wmsqualityinspectionlist/list',
        key: 'id',
        tableColumn: 5,
        muti: false,
      },
      dialog: {
        title: '新增',
        row: {},
      },
    },
    transition: 'slide-fade',
    methods: {
    },
    mounted: function () {
      this.tableWatch('table');
    },
  });
</script>
<style scoped lang="scss">
  .box-card {
    margin: 20px;
  }

  .createTimeSpan {
    display: block;
    margin-top: 34px;
  }

  @media screen and (max-width: 800px) {
    .createTimeSpan {
      margin-top: 0;
    }
    .box-card {
      margin: 0;
    }
  }

  .el-select {
    width: 100%;
  }
</style>

<style lang="scss">

</style>
